<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui">

<h:head>
	<title>SDDP</title>
	<h:outputStylesheet library="css" name="estilo.css"/>
	<h:outputScript name="jsf.js" library="javax.faces" target="body"/>
</h:head>

<h:body>
	<div id="cabecalho">
		<h:graphicImage library="img" name="logo.gif" id="logoCompany" />
	</div>

	<div id="conteudo">
		<h:form>
			<p:menubar>
				<p:menuitem value="Home" url="index.xhtml" update=":conteudo"/>

				<p:submenu id="menuAdm" label="Dúvidas" rendered="#{sessionScope.perfil != 'prof'}">					
					<p:menuitem id="submenu3" value="Dúvidas respondidas" url="visualizar-respostas-geral.xhtml"/>
					<p:menuitem id="submenu4" value="Dúvidas abertas" url="responder-duvida.xhtml"/>
				</p:submenu>

				<p:submenu id="menuProf" label="Duvidas" rendered="#{sessionScope.perfil == 'prof'}">
					<p:menuitem id="submenu1" value="Postar dúvida" url="criar-duvida.xhtml"/>
					<p:menuitem id="submenu2" value="Dúvidas respondidas" url="visualizar-respostas.xhtml"/>
					<p:menuitem id="submenu8" value="Dúvidas Abertas" url="duvidas-abertas.xhtml"/>				
				</p:submenu>
				
				<p:submenu label="Usuário">
					<p:menuitem id="submenu5" value="Controle de usuários" url="controle-usuarios.xhtml" rendered="#{sessionScope.perfil == 'adm'}"/>
					<p:menuitem id="submenu6" value="Adicionar usuário" url="adicionar-usuario.xhtml" rendered="#{sessionScope.perfil == 'adm'}"/>
					<p:menuitem id="submenu7" value="Alterar senha" url="alterar-senha.xhtml"/>
					<p:menuitem id="submenu9" value="Alterar email" url="alterar-email.xhtml"/>					
				</p:submenu>

				<p:menuitem value="Relatório" url="relatorio.xhtml" rendered="#{sessionScope.perfil == 'adm'}" />
				
				<p:menuitem value="Sair" action="#{loginBean.logout}" />
			</p:menubar>
		</h:form>
		<ui:insert name="corpo" />
	</div>
	<div id="rodape">------------Laboratório de desenvolvimento 2012-----------</div>
</h:body>
</html>